Conventional fragment processing for three-dimensional (3-D) graphics programming application program interfaces (APIs) such as Open Graphics Library (OpenGL®) and Direct3D™ provide support for per-fragment operations. The computations provided by such conventional fragment processing are routinely implemented by 3-D graphics hardware that greatly accelerates these operations.
Unextended OpenGL mandates a certain set of configurable per-fragment computations defining texture lookup, texture environment, color sum, and fog operations. Each of these areas provides a useful but limited set of fixed operations. For example, unextended OpenGL 1.2.1 provides only four texture environment modes, color sum, and three fog modes.
One drawback associated with the current state of the art graphics APIs is that most computations dealing with color or depth buffers are typically constrained to operate on values in the range [0,1]. Computational results are also typically clamped to the range [0,1]. Color, texture, and depth buffers themselves also hold values mapped to the range [0, 1]. Unfortunately, these constraints and the limited precision of typical computations can result in reduced accuracy during graphics processing.
Further, some [0] quantities that users of programmable graphics APIs would like to compute do not necessarily correspond in number or in range to conventional attributes such as RGBA colors or depth values. Because of the range and precision constraints imposed by conventional fixed-point color buffers, it may be difficult (if not impossible) to use them to implement certain multi-pass algorithms where the intermediate results need to be stored in the frame buffer.
There is thus a need for an application program interface that provides a frame buffer and texture format that allows fragment programs and other applications to read and write unconstrained floating point data.